class Animal:
    def __init__(self,name):
        self.name=name
    def feed(self):
        self.say()
    def say(self):
        print("我测你们的码")
class Cat(Animal):
    def __init__(self,name):
     super().__init__(name)
    def say(self):
        print(f"喵喵，我是{self.name}。")
class Dog(Animal):
    def __init__(self,name):
     super().__init__(name)
    def say(self):
        print(f"汪汪，我是{self.name}。")
class Person:
    def own(self,pet):
        if isinstance(pet,Animal):
            pet.feed()
cat=Cat("布丁")
cat.feed()
dog=Dog("锤子")
dog.feed()
person=Person()
person.own(cat)
person.own(dog)





